package {

import flash.display.Shape;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

import flash.events.Event;

import flash.text.TextField;

import mx.controls.Alert;
import mx.controls.Button;
import mx.core.UIComponent;
import mx.rpc.remoting.RemoteObject;

public class TestInvoke extends Sprite {
    public function TestInvoke() {
//        //Alert.show("Dziala");
//        var component = new UIComponent();
//        this.addChild(component);
//        component.addChild(new Button());
        
//        var links = new RemoteObject();
//        links.endpoint = "http://localhost:8080/messagebroker/amf";
//        links.addEventListener("fault", defaultFaultHandler);
//        links.getMsg.addEventListener("result", defaultResultHandler);

        // creating a new shape instance
            
            var button:Button = new Button();
            button.label = "Click me";
            var circle:Shape = new Shape( );
            // starting color filling
            circle.graphics.beginFill( 0xff9933 , 1 );
            // drawing circle
            circle.graphics.drawCircle( 0 , 0 , 40 );
            // repositioning shape
            circle.x = 40;
            circle.y = 40;


            // adding displayobject to the display list
            addChild( circle );

            addChild(button);
        button.x = 12;
        button.y = 10;

        var myButton:Button = new Button();
myButton.label = "emphasizedPadding:1";
myButton.emphasized = true;
myButton.width = 150;
myButton.move(20, 20);
addChild(myButton);


    }

    private function defaultResultHandler():void {
    }

    private function defaultFaultHandler():void {
    }
}
}